#if TMP_PRESENT
using UnityEngine;

namespace UnityDefaultSetting.TextMeshProDefaultSetting
{
    [CreateAssetMenu(fileName = "TextMeshProDefaultTemplateConfig", menuName = "ScriptableObjects/TextMeshProDefaultTemplateConfig", order = 1)]
    [System.Serializable]
    public class TextMeshProDefaultTemplateConfig : ScriptableObject
    {
        [SerializeField, HideInInspector]
        private bool isInitialized;

        [HideInInspector]
        public bool isEnable = true;

        public TextMeshProDefaultSettingConfig TMP_TextConfig;

        public TextMeshProDefaultSettingConfig TMP_TextUGUIConfig;
        public TextMeshProDefaultSettingConfig TMP_ButtonTextConfig;
        public TextMeshProDefaultSettingConfig TMP_DropDownItemLabelConfig;
        public TextMeshProDefaultSettingConfig TMP_DropDownLabelConfig;
        public TextMeshProDefaultSettingConfig TMP_InputFieldPlaceholderConfig;
        public TextMeshProDefaultSettingConfig TMP_InputFieldTextConfig;


        private void OnEnable()
        {
            if (isInitialized == false)
            {
                isEnable = true;
                TMP_TextConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_DefaultSettingConfig");
                TMP_TextUGUIConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_UGUIDefaultSettingConfig");
                TMP_ButtonTextConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_ButtonTextDefaultSettingConfig");
                TMP_DropDownItemLabelConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_DropDownItemLabelDefaultSettingConfig");
                TMP_DropDownLabelConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_DropDownLabelDefaultSettingConfig");
                TMP_InputFieldPlaceholderConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_InputFieldPlaceholderDefaultSettingConfig");
                TMP_InputFieldTextConfig = Resources.Load<TextMeshProDefaultSettingConfig>("TextMeshPreConfig/TMP_InputFieldTextDefaultSettingConfig");

                isInitialized = true;
            }
        }
    }
}
#endif

